package com.shuai.analysis.domain.request;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@Validated
public class ChartQueryRequest implements Serializable {

    @Length(max = 50, message = "图表名称不能超过50字")
    private String name;

    /**
     * 生成图表类型
     */
    @Pattern(regexp = "^(折线图|柱状图|堆叠图|饼图|雷达图)$", message = "图表类型必须是折线图、柱状图、堆叠图、饼图或雷达图之一")
    private String chartType;


    /**
     * 当前页
     */
    private int page;
    private int pageSize;

    private static final long serialVersionUID = 3191241716373120793L;
}
